import { request } from '@inbiz/utils';

/**
 * 查询分组列表
 */
export async function getGroupList() {
  return request(
    `/inbiz/api/services/engines/v${InbizConfig.API_VERSION}/environmentGroup/loadList`,
  );
}

/**
 * 获取某个分组下的环境变量
 * @param params
 */
export async function getGroupPageList(parentId: any, page: any) {
  return request(
    `/inbiz/api/services/engines/v${InbizConfig.API_VERSION}/environmentGroup/pagedList/${parentId}`,
    {
      params: {
        isVisible: true,
        ...page,
      },
    },
  );
}
